package com.djz.tool.utils;

import com.djz.tool.wrapper.ResponseWrapper;

/**
 * 响应工具类
 * @author djz
 */
public class ResponseUtils {

    public static <T> ResponseWrapper<T> success(T data) {
        return new ResponseWrapper<>(200, "成功", data);
    }
    public static <T> ResponseWrapper<T> fail(String message) {
        return new ResponseWrapper<>(500, message, null);
    }

    public static ResponseWrapper<Void> fail(int code, String message) {
        return new ResponseWrapper<>(code, message, null);
    }
}
